#include <stdio.h>

int main() {
	setbuf(stdout, NULL);

	// NOTE: Variable declaration
	int step_count, n;

	// NOTE: Inputs
	scanf("%d", &n);

	// NOTE: Process
	for (step_count = 0; n != 1; ++step_count) {
		if (n % 2 == 0) {
			// 如果它是偶数，那么把它砍掉一半
			n /= 2;
		} else {
			// 如果它是奇数，那么把 (3n+1) 砍掉一半
			n = n * 3 + 1;
			n /= 2;
		}
	}

	// NOTE: Outputs
	printf("%d\n",step_count);

	// NOTE: Ending
	return 0;
}